<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="Generator" content="ECSHOP v2.7.1" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Keywords" content="<?php echo $this->_var['keywords']; ?>" />
<meta name="Description" content="<?php echo $this->_var['description']; ?>" />

<title><?php echo $this->_var['page_title']; ?></title>

<link rel="shortcut icon" href="favicon.ico" />
<link rel="icon" href="animated_favicon.gif" type="image/gif" />
<link href="<?php echo $this->_var['ecs_css_path']; ?>" rel="stylesheet" type="text/css" />
<link href="themes/default/product_new.css" rel="stylesheet" type="text/css" />
<?php if ($this->_var['cat_style']): ?>
<link href="<?php echo $this->_var['cat_style']; ?>" rel="stylesheet" type="text/css" />
<?php endif; ?>

<script language="javascript" type="text/javascript">
// phone detail retrieve
function f_phoneDetail(phoneId, phoneNo) {
	document.form.action="web.product.RetrievePhoneInfo.laf";
	document.form.phoneId.value = phoneId;
	document.form.phoneNo.value = phoneNo;
	document.form.submit();
}

// search
function f_search(flag) {

	if (flag == "Y") {
    	// quick search
        f_advancedReset(); // advanced search condition init
		f_SytleReset();	   // style phones search condition init
        document.getElementById("quickSearch").value = "Y";        
        document.getElementById("advancedKeyWord").value = "";
    } else {
        // advanced search
        f_quickReset(); // quick search condition init
        f_SytleReset();	   // style phones search condition init
        document.getElementById("quickSearch").value = "N";    
        document.getElementById("quickKeyWord").value = "";   
    }

    document.form.target="_self";
    document.form.action="web.product.RetrievePhoneList.laf";
	document.form.submit();
}

// advanced search condition reset
function f_advancedReset() {
	for (var i = 0; i < document.getElementsByName("look"         ).length; i++) document.getElementsByName("look"         )[i].checked = false;
    for (var i = 0; i < document.getElementsByName("brand"        ).length; i++) document.getElementsByName("brand"        )[i].checked = false;
    for (var i = 0; i < document.getElementsByName("network"      ).length; i++) document.getElementsByName("network"      )[i].checked = false;
    for (var i = 0; i < document.getElementsByName("screentype"   ).length; i++) document.getElementsByName("screentype"   )[i].checked = false;
    for (var i = 0; i < document.getElementsByName("camera"       ).length; i++) document.getElementsByName("camera"       )[i].checked = false;
    for (var i = 0; i < document.getElementsByName("multimedia"   ).length; i++) document.getElementsByName("multimedia"   )[i].checked = false;
    for (var i = 0; i < document.getElementsByName("entertainment").length; i++) document.getElementsByName("entertainment")[i].checked = false;
    for (var i = 0; i < document.getElementsByName("connectivity" ).length; i++) document.getElementsByName("connectivity" )[i].checked = false;
    for (var i = 0; i < document.getElementsByName("others"       ).length; i++) document.getElementsByName("others"       )[i].checked = false;
}

// detail search layer view
function f_advancedLayer() {
	document.getElementById("searchLayer").style.display = "block";
}

// advanced search layer close
function f_layerClose() {
	document.getElementById("searchLayer").style.display = "none";
}

// retrieve result ordering
function f_ordering(flag, location) {
	if(location == "UP"){
		document.getElementById("attrCode").value = document.getElementById("attrCodeUp").value;
	} else {
		document.getElementById("attrCode").value = document.getElementById("attrCodeDown").value;
	}

	if (document.getElementById("attrCode").value != "") {
		f_search(flag);
    }
}

// quick search condition reset


// phone compare
function f_phoneCompare() {

	// list none, list single
	  var url = document.location.href;
        url = url.substring(0,url.lastIndexOf('/')+1) + "compare.php";
    if (document.frmCompare.goods == undefined || document.frmCompare.goods.length == undefined) {
    	return;
    }
    // list multi
    if (document.frmCompare.goods.length != undefined) {
		var checkCnt = 0;

        for (i = 0; i < document.frmCompare.goods.length; i++) {
			if(document.frmCompare.goods[i].value != ""){
			   if(i==0){
            url += "?goods[]=" + document.frmCompare.goods[i].value;
          }else{
            url += "&goods[]=" + document.frmCompare.goods[i].value;
	    }
	   
                checkCnt++;

            }
        }
        if (checkCnt < 2) return;
    }
     
	window.open(url);
}


// quick search condition reset

</script>
<SCRIPT LANGUAGE="JavaScript">
<!--
document.getElementsByClassName = function(className) {
	var children = document.getElementsByTagName('*') || document.all;
	var elements = new Array();
  
	for (var i = 0; i < children.length; i++) {
		var child = children[i];
		var classNames = child.className.split(' ');
		for (var j = 0; j < classNames.length; j++) {
			if (classNames[j] == className) {
				elements.push(child);
				break;
			}
		}
	}
	return elements;
}

var Reflection = {
	defaultHeight : 0.5,
	defaultOpacity: 0.5,
	
	add: function(image, options) {
		Reflection.remove(image);
		
		doptions = {"height" : Reflection.defaultHeight, "opacity" : Reflection.defaultOpacity}
		if (options) {
			for (var i in doptions) {
				if (!options[i]) {
					options[i] = doptions[i];
				}
			}
		} else {
			options = doptions;
		}
	
		try {
			var d = document.createElement('div');
			var p = image;
			
			var classes = p.className.split(' ');
			var newClasses = '';
			for (j=0;j<classes.length;j++) {
				if (classes[j] != "reflect") {
					if (newClasses) {
						newClasses += ' '
					}
					
					newClasses += classes[j];
				}
			}

			var reflectionHeight = Math.floor(p.height*options['height']);
			var divHeight = Math.floor(p.height*(1+options['height']));
			
			var reflectionWidth = p.width;
	
			/* Copy original image's classes & styles to div */
			d.className = newClasses;
			p.className = 'reflected';
			
			d.style.cssText = p.style.cssText;
			p.style.cssText = ' ';
			
			if (document.all && !window.opera) {
				var reflection = document.createElement('img');
				reflection.src = p.src;
				reflection.style.width = reflectionWidth+'px';
				
				reflection.style.marginBottom = "-"+(p.height-reflectionHeight)+'px';
				reflection.style.filter = 'flipv progid:DXImageTransform.Microsoft.Alpha(opacity='+(options['opacity']*100)+', style=1, finishOpacity=0, startx=0, starty=0, finishx=0, finishy='+(options['height']*100)+')';
				
				d.style.width = reflectionWidth+'px';
				d.style.height = divHeight+'px';
				p.parentNode.replaceChild(d, p);
				
				d.appendChild(p);
				d.appendChild(reflection);
			} else {
				var canvas = document.createElement('canvas');
				var context = canvas.getContext("2d");
			
				canvas.style.height = reflectionHeight+'px';
				canvas.style.width = reflectionWidth+'px';
				canvas.height = reflectionHeight;
				canvas.width = reflectionWidth;
				
				d.style.width = reflectionWidth+'px';
				d.style.height = divHeight+'px';
				p.parentNode.replaceChild(d, p);
				
				d.appendChild(p);
				d.appendChild(canvas);
				
				context.save();
				
				context.translate(0,image.height-1);
				context.scale(1,-1);
				
				context.drawImage(image, 0, 0, reflectionWidth, image.height);

				context.restore();
				
				context.globalCompositeOperation = "destination-out";
				var gradient = context.createLinearGradient(0, 0, 0, reflectionHeight);
				
				gradient.addColorStop(1, "rgba(255, 255, 255, 1.0)");
				gradient.addColorStop(0, "rgba(255, 255, 255, "+(1-options['opacity'])+")");
	
				context.fillStyle = gradient;
				if (navigator.appVersion.indexOf('WebKit') != -1) {
					context.fill();
				} else {
					context.fillRect(0, 0, reflectionWidth, reflectionHeight*2);
				}
			}
		} catch (e) {
	    }
	},
	
	remove : function(image) {
		if (image.className == "reflected") {
			image.className = image.parentNode.className;
			image.parentNode.parentNode.replaceChild(image, image.parentNode);
		}
	}
}

function addReflections() {
	var rimages = document.getElementsByClassName('reflect');
	for (i=0;i<rimages.length;i++) {
		var rheight = null;
		var ropacity = null;
		
		var classes = rimages[i].className.split(' ');
		for (j=0;j<classes.length;j++) {
			if (classes[j].indexOf("rheight") == 0) {
				var rheight = classes[j].substring(7)/100;
			} else if (classes[j].indexOf("ropacity") == 0) {
				var ropacity = classes[j].substring(8)/100;
			}
		}
		
		Reflection.add(rimages[i], {height: rheight, opacity : ropacity});
	}
}

var previousOnload = window.onload;
window.onload = function () {if(previousOnload) previousOnload(); addReflections();f_compareBoxFirstLocator()}

  function cleanall(){
        document.getElementById("compare").innerHTML="";
	for (var key in Compare.data)
    {
        delete Compare.data[key];
	}
        Compare.save();
        Compare.init();
      }
//-->
</SCRIPT>
<?php echo $this->smarty_insert_scripts(array('files'=>'common.js,global.js,transport.js,utils.js,product_new.js')); ?>
</head>
<body>
<?php echo $this->fetch('library/page_header.lbi'); ?>
<div class="block hr_main">


  <div class="hr_main_left" style="width:187px;">
     
 <?php $_from = $this->_var['categories']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'cat');if (count($_from)):
    foreach ($_from AS $this->_var['cat']):
?>
     <div class="hr_main_left_title">
    <?php echo htmlspecialchars($this->_var['cat']['name']); ?>
     </div>
     <div class="hr_main_left_list">
    <ul>
 <?php $_from = $this->_var['cat']['children']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'child');if (count($_from)):
    foreach ($_from AS $this->_var['child']):
?>
      <li  <?php if ($this->_var['category'] == $this->_var['child']['id']): ?>class="list_hover"<?php endif; ?>>
      <strong><a href="<?php echo $this->_var['child']['url']; ?>"  ><?php echo htmlspecialchars($this->_var['child']['name']); ?></a></strong>
      </li>
     
     <?php $_from = $this->_var['child']['cat_id']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'cat_id');if (count($_from)):
    foreach ($_from AS $this->_var['cat_id']):
?>
<li <?php if ($this->_var['category'] == $this->_var['cat_id']['id']): ?>class="list_hover"<?php endif; ?>>
      <a href="<?php echo $this->_var['cat_id']['url']; ?>" ><?php echo htmlspecialchars($this->_var['cat_id']['name']); ?></a>
      </li>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
   </ul>
    </div>
     
   
    <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
   
   
  </div>
  <div class="hr_main_right f_r">
    <div class="aboutus_ad">
    <img src="themes/default/images/product_ad.gif" width="759" height="197" />
    </div>
    <div class="product_right_list_top">
      <div class="f_l product_right_list_top_left">
      <ul>
      <li>排列选项:</li><li><img src="themes/default/images/list_btn.gif" width="110" height="18" style="margin-top:5px;"/></li>
      </ul>
      </div>
      <div class="f_r goods_pager" >
      <span>页数：</span>
<?php if ($this->_var['pager']['page_first']): ?><a href="<?php echo $this->_var['pager']['page_first']; ?>"><< </a><?php endif; ?>
        <?php if ($this->_var['pager']['page_next']): ?><a class="next" href="<?php echo $this->_var['pager']['page_prev']; ?>"><</a><?php endif; ?>  
<?php if ($this->_var['pager']['page_count'] != 1): ?>
    <?php $_from = $this->_var['pager']['page_number']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'item');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['item']):
?>
      <?php if ($this->_var['pager']['page'] == $this->_var['key']): ?>
      <span class="page_now"><?php echo $this->_var['key']; ?></span>
      <?php else: ?>
      <a href="<?php echo $this->_var['item']; ?>"><?php echo $this->_var['key']; ?></a>
      <?php endif; ?>
    <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
  <?php endif; ?>  <?php if ($this->_var['pager']['page_next']): ?><a class="next" href="<?php echo $this->_var['pager']['page_next']; ?>">> </a><?php endif; ?> <?php if ($this->_var['pager']['page_last']): ?><a class="last" href="<?php echo $this->_var['pager']['page_last']; ?>">>></a><?php endif; ?>
      </div>
    </div>
  <?php echo $this->fetch('library/goods_list.lbi'); ?>

  <div id="compareBox" style="position: absolute; margin-left: 106px; top: 900px;">

				
					<div onMouseOut="isCompare='';" onMouseOver="isCompare='compare';" class="compareBox2">
						
						<div id="compareBoxUp" class="cmt">
							<div class="compareBox_top"><img src="themes/default/images/bar_bg_top.gif"/></div>
							<ul class="list_phone">
									<li id="compareBoxUp1" class="model_phone"/>
									<li class="dot_line"/>
									<li id="compareBoxUp2" class="model_phone"/>
									<li class="dot_line"/>
									<li id="compareBoxUp3" class="model_phone"/>
									<li class="btn">
									<div class="p0"><a href="javascript:f_phoneCompareDown();">比较</a></div>
								
									<!-- div class="p2">Sleep</div-->
									</li>
							</ul>
							<div class="go_compare">
								<ul class="list">
									<li id="compareBoxUpText1" class="model"/>
									<li class="dot_line"/>
									<li id="compareBoxUpText2" class="model"/>
									<li class="dot_line"/>
									<li id="compareBoxUpText3" class="model"/>
									<li class="btn"><a class="btn" href="javascript:f_phoneCompare();"></a>
								</li></ul>
							</div>
						</div>
							
						
						<div id="compareBoxDown" class="cmt2">
							<div class="compareBox_top"><img src="themes/default/images/bar_bg_top.gif"/></div>
							<ul class="list">
								<li id="compareBoxDown1" class="model"/>
								<li class="dot_line"/>
								<li id="compareBoxDown2" class="model"/>
								<li class="dot_line"/>
								<li id="compareBoxDown3" class="model"/>
								<li class="btn"><div><a href="javascript:f_phoneCompareUp();">比较</a></div></li>
							</ul>
						</div>
						
					</div>
				<div>



</div>

</div>
</div>



		        
<form name="frmCompare" style="margin: 0px; padding: 0px;">
	<input name="goods" value="" type="hidden">
	<input name="goods" value="" type="hidden">
	<input name="goods" value="" type="hidden">
</form>

<div class="blank"></div>
<?php echo $this->fetch('library/page_footer.lbi'); ?>
</body>
</html>
